home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 November / Chip_2004-11_cd1.bin / zkuste / dolby / download / dvdlab / DVDlabProRC2b.exe / {app} / Extras / Script / glow2.talk < prev    next >
Text File  |  2004-03-22  |  2KB  |  52 lines

  1. /*    Sixties fat Glow 1.0
  2.     by Oscar, 11 Dec 2003
  3.     
  4.     To run this: DROP the Script from Assets to the Object in Menu.
  5.     
  6.     this example creates fancy sixties-like glow to an object
  7.     works great with text with strange font
  8.     Note: because of the bitmap merging, the text will become not-editable
  9. */
  10.  
  11. // Get the current menu and selected object when you drag and drop script
  12. // Note: if testing from Script editor make sure you have just one menu opened on desktop,
  13. //       in such case the MenuGetCurSel will return currently opened menu 
  14. menu = MenuGetCurSel()
  15. // MenuGetCurSel returns: VTS menu 1..255, VMG menu 10001..10255 
  16.  
  17. if menu==0 then
  18.     print "This script can be used only with menu."
  19.     end
  20. endif
  21.  
  22. // show the current menu on top of all others
  23. MenuActivate(menu)
  24.  
  25. // Get the currently selected object on that menu 
  26. // or an object that the script was dropped on
  27. object= ObjectGetCurSel(menu)
  28.  
  29. if object==0 then
  30.     print "You have to use the script on an object (selected or dropped on)"
  31.     end
  32. endif
  33.  
  34. intensity = 20
  35.  
  36. // The object is defined by the menu number and the object number
  37.  
  38. // set Shadow offset to be zero
  39. ObjectShadowOffset(menu,object,0,0)
  40. // set shadow attributes
  41. ObjectShadowAttr(menu,object, intensity,30)
  42.  
  43. // create a shadow color and type (5=fat) then merge object with this shadow few times
  44. for i=0 to 5
  45.     ObjectSetShadow(menu,object,RGB(255,i*50,0),5)
  46.     ObjectMergeShadow(menu,object)
  47. next i
  48.  
  49. // now put a larger fat shadow yellow
  50. ObjectShadowAttr(menu,object,60,30)
  51. ObjectSetShadow(menu,object,RGB(255,255,0),5)